package edu.rit.drh4818.fire.emitter;

import java.util.Random;



/**
 * Emit several rows of data particles.
 * 
 * @author Darren Headrick
 *
 */
public class RandomRowEmitter implements Emitter 
{
	public static String NAME = "Random Row";
	
	public String toString()
	{
		return NAME;
	}

	public short[][][] emit(short[][][] base) 
	{
		Random r = new Random();
		
		for( int x = 0; x < base.length-5; x++ )
		{
			if( x%10>5 )
			{
				for( int z = 0; z < base[x][0].length; z++ )
				{
						base[x][0][z] = (short)(Math.abs( r.nextInt() ) % 255);
				}
			}
		}
		return base;
	}
}
